//
//  XBAudioUploader.h
//  qkd_audio_recorder
//
//  Created by Luoei on 2020/4/18.
//

#import <Foundation/Foundation.h>

// 0 - 失败 1 - 成功 2 - 录音过短 3 - 上传失败
typedef void(^XBAudioUploaderCompleteBlock)(NSString *url, NSInteger result);

@interface XBAudioUploader : NSObject

/// 本地录音地址
@property(nonatomic,copy) NSString * path;

/// 上传完成
@property(nonatomic,strong) XBAudioUploaderCompleteBlock completeBlock;


-(void)start;

-(void)stop;

-(void)destory;

/// 设置阿里云OSS Client
+(void)setAliyunOSSClient:(id)client;

/// 设置阿里云域名
+(void)setResourceDomain:(NSString *)domain;

/// 上传本地文件
-(void)uploadWithPath:(NSString *)path;

@end
